<?php
	$var = array(4,3,6,7,9,1,2,12,8,1,0);
	$x = 5;
	
	$isThere = false; 
	
	for($i=0; $i<count($var); $i++)
	{
		if($var[$i] == $x)
		{
			$isThere = true;
		} else {
			$isThere = false; 
		}
	}
	
	if($isThere)
	{
		echo "$x is present";
	} else {
		echo "$x is not present";
	}

?>